home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / QBWIZ12.ARJ / CRT.ASM < prev    next >
Assembly Source File  |  1991-02-20  |  2KB  |  56 lines

  1. comment #
  2.  
  3.    +----------------------------------------------------------------------+
  4.    |                                                                      |
  5.    |         QBWIZ  Copyright (c) 1990-1991  Thomas G. Hanlin III         |
  6.    |                                                                      |
  7.    |                       QuickBASIC Access Library                      |
  8.    |                                                                      |
  9.    |               assembled with the excellent OPTASM by SLR             |
  10.    |                                                                      |
  11.    +----------------------------------------------------------------------+
  12.  
  13. #
  14.  
  15. public  CRT
  16.  
  17.  
  18. .model medium
  19.  
  20. .code
  21.  
  22.  
  23.  
  24. CRT           proc                     ; get display adapter type
  25.               mov            al,b$Adapter   ;
  26.               test           al,1           ; MDA?
  27.               jnz            #MDA           ;   yep, set it
  28.               test           al,2           ; CGA?
  29.               jnz            #CGA           ;   yep, set it
  30.               test           al,4           ; EGA?
  31.               jnz            #EGA           ;   yep, set it
  32. #VGA:         mov            ax,"GV"        ;
  33. #Done:        mov            String,ax      ; save first char
  34.               lea            ax,Str         ; point to string header
  35.               ret                           ;
  36. #MDA:         mov            ax,"DM"        ;
  37.               jmp            #Done          ;
  38. #CGA:         mov            ax,"GC"        ;
  39.               jmp            #Done          ;
  40. #EGA:         mov            ax,"GE"        ;
  41.               jmp            #Done          ;
  42. CRT           endp                     ; get display adapter type
  43.  
  44.  
  45.  
  46. .data
  47.  
  48. extb     b$Adapter
  49.  
  50. Str      dw 3,offset String
  51. String   db "MDA"
  52.  
  53.  
  54.  
  55.               end
  56.